package com.zis.auction.controller;

import com.zis.auction.model.SubFile;
import com.zis.auction.service.ISubFileInter;
import com.zis.core.SearchParams;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Create by wangshen 2018/1/14
 */
@RestController
@RequestMapping("/api/auction/sub/file")
public class SubFileController {

    @Autowired
    private ISubFileInter subFileInter;


    @RequestMapping(value = "/list", method = RequestMethod.POST)
    @ResponseBody
    public PageQuery<SubFile> findByPage(@RequestBody SearchParams params) throws Exception {
        return subFileInter.findByPage(params);
    }


    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
    @ResponseBody
    public String delete(@PathVariable("id") String id) throws Exception{
        return subFileInter.delete(id);
    }

}
